Skip to content

feat: add real-time progress feedback for AI analysis#189

Open
crystalin wants to merge 4 commits intomainfrom
feat/ai-analysis-realtime-feedback
Open

feat: add real-time progress feedback for AI analysis#189
crystalin wants to merge 4 commits intomainfrom
feat/ai-analysis-realtime-feedback

Conversation

@crystalin
Copy link
Copy Markdown
Contributor

@crystalin crystalin commented Apr 3, 2026

Summary

  • Adds step-based progress indicator to the AI analysis processing panel, showing clear stages: QueuedGeneratingResults Ready
  • Displays elapsed time counter during analysis processing so users know it's working
  • Shows a success toast notification when analysis completes (auto-dismisses after 4 seconds)
  • Smooth slide-in animation when transitioning from processing to completed state
  • Detects stalled analyses: warns users when the worker hasn't picked up the job (>30s pending) or processing is taking too long (>3min)
  • Stops polling after 5 minutes with a clear message instead of spinning forever
  • Shows a Retry Analysis button when the analysis appears stalled

Before: Static "Analysis in progress..." message with no stage indication; users had to manually refresh to see results and could wait forever with no feedback.

After: Clear visual progress through stages with elapsed timer. Warning when analysis is stalled. Auto-stop polling with retry option. Toast notification when analysis is ready.

Changes

  • services/dashboard/src/routes/partials/analysis.ts — Enhanced renderProcessingPanel with progress steps, timer, stalled detection, and retry button; added completion toast and animation to renderCompletedPanel
  • docs/06-Reference/changelog.md — Added changelog entry

Test plan

  • Trigger AI analysis on a conversation and verify progress steps show correctly
  • Verify "Queued, waiting for worker..." shows initially, then transitions to "Generating analysis with AI..." when status changes to processing
  • Verify elapsed time counter increments on each poll
  • Verify amber warning appears after ~30s if analysis stays pending
  • Verify polling stops after 5 minutes with "Polling stopped" message
  • Verify "Retry Analysis" button appears when stalled and works correctly
  • Verify success toast appears when analysis completes
  • Verify toast auto-dismisses after ~4 seconds
  • Verify no toast appears when viewing an already-completed analysis (page load)
  • Verify regenerate still works correctly

🤖 Generated with Claude Code

crystalin and others added 4 commits April 3, 2026 14:36
Shows step-based progress indicator (Queued → Generating → Results Ready)
with elapsed time counter during analysis. Displays success toast
notification when analysis completes via polling, with smooth animations.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Detects when analysis is stuck (pending >30s or processing >3min) and
shows a warning banner with amber styling. Stops polling after 5 minutes
and offers a "Retry Analysis" button. Prevents infinite spinner UX.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Elapsed time now updates every second via a client-side setInterval
instead of only refreshing on HTMX poll cycles. The timer self-cleans
when the panel is swapped out by HTMX.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…swap

The toast, style, and script elements were rendered as siblings before
the #analysis-panel div. HTMX outerHTML swap expects a single root
element - the extra siblings caused the swap to break, leaving the
processing panel stuck even after analysis completed. Moving everything
inside the panel div ensures HTMX correctly replaces the entire panel.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant